<?php
class BrandUrl extends AppModel {
	var $name = 'BrandUrl';
	var $displayField = 'system_name';
	var $validate = array(
		
		'system_name' => array(
			'notempty' => array(
				'rule' => array('notempty'),
				//'message' => 'Your custom message here',
				//'allowEmpty' => false,
				//'required' => false,
				//'last' => false, // Stop validation after this rule
				//'on' => 'create', // Limit validation to 'create' or 'update' operations
			),
		),
			
		'created' => array(
			'date' => array(
				'rule' => array('date'),
				//'message' => 'Your custom message here',
				//'allowEmpty' => false,
				//'required' => false,
				//'last' => false, // Stop validation after this rule
				//'on' => 'create', // Limit validation to 'create' or 'update' operations
			),
		),
	);
	//The Associations below have been created with all possible keys, those that are not needed can be removed

	/*var $hasMany = array(
		'BrandMasterUrlValue' => array(
			'className' => 'BrandMasterUrlValue',
			'foreignKey' => 'master_url_id',
			'dependent' => false,
			'conditions' => '',
			'fields' => '',
			'order' => '',
			'limit' => '',
			'offset' => '',
			'exclusive' => '',
			'finderQuery' => '',
			'counterQuery' => ''
		)
	);*/
    
    function activeData()
    {
        return $this->find('all',array('conditions'=>array('BrandUrl.status'=>'active')));
    }

    function activeDisplayData()
    {
        return $this->find('all',array('conditions'=>array('BrandUrl.status'=>'active','BrandUrl.display'=>'active')));
    }
	
	
    
}
